package com.sinodoggo.shitcloud.controller;


import com.sinodoggo.shitcloud.commons.Result;
import com.sinodoggo.shitcloud.entity.Icon;
import com.sinodoggo.shitcloud.service.IIconService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sinodoggo
 * @since 2022-11-22
 */
@RestController
@RequestMapping("/icon")
public class IconController {
    @Resource
    private IIconService iconService;

    @GetMapping
    public Result getAllIcons() {
        final List<Icon> iconList = iconService.list();
        return Result.success(iconList);
    }
}

